import request from '@/utils/request'

export function getUserList(data) {
    return request({
        url: '/adminGetUserList',
        method: 'get',
        params: data
    })
}

export function getTotal() {
    return request({
        url: '/getAllTableNumbers',
        method: 'get',
        params: { table_name: 'user' }
    })
}

export function removeUser(data) {
    return request({
        url: '/adminDeleteUser',
        method: 'delete',
        params: { id: data }
    })
}

export function updateUserInfo(data) {
    return request({
        url: '/adminUpdateUserInfo',
        method: 'put',
        params: data
    })
}

export function readUserInfo(data) {
    return request({
        url: '/adminGetUserInfo',
        method: 'get',
        params: { id: data }
    })
}